<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/financier.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ListVirementTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form >
                    <p:dataTable value="#{virementController.items}" var="item" id="tableId" paginator="true" rows="10" >
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVirementTitle_nomVirement}"/>
                            </f:facet>
                            <h:outputText value="#{item.nomVirement}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVirementTitle_montant}"/>
                            </f:facet>
                            <h:outputText value="#{item.montant}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVirementTitle_dateVirement}"/>
                            </f:facet>
                            <h:outputText value="#{item.dateVirement}">
                                <f:convertDateTime pattern="MM/dd/yyyy" />
                            </h:outputText>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVirementTitle_credit}"/>
                            </f:facet>
                            <h:outputText value="#{item.credit.nomMouvement}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListVirementTitle_debit}"/>
                            </f:facet>
                            <h:outputText value="#{item.debit.nomMouvement}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="&nbsp;"/>
                            </f:facet>
                            <h:commandLink action="#{virementController.prepareView}" value="#{bundle.ListVirementViewLink}"/>
                            <h:outputText value=" "/>
                            <h:commandLink action="#{virementController.prepareEdit}" value="#{bundle.ListVirementEditLink}"/>
                            <h:outputText value=" "/>
                            <h:commandLink action="#{virementController.destroy}" value="#{bundle.ListVirementDestroyLink}"/>
                        </p:column>
                    </p:dataTable>
                <h:commandLink>
                    <p:graphicImage value="/resources/images/icones/XLS.png" />
                    <p:dataExporter type="xls" target="tableId" fileName="Virement" excludeColumns="5" />
                </h:commandLink>
                <h:commandLink>
                    <p:graphicImage value="/resources/images/icones/PDF.png" />
                    <p:dataExporter type="pdf" target="tableId" fileName="Virement" excludeColumns="5" />
                </h:commandLink>
                <h:commandLink>
                    <p:graphicImage value="/resources/images/icones/CSV.png" />
                    <p:dataExporter type="csv" target="tableId" fileName="Virement" excludeColumns="5" />
                </h:commandLink>
                <h:commandLink>
                    <p:graphicImage value="/resources/images/icones/XML.png" />
                    <p:dataExporter type="xml" target="tableId" fileName="Virement" excludeColumns="5" />
                </h:commandLink>
                <br />
                <h:commandLink action="#{virementController.prepareCreate}" value="#{bundle.ListVirementCreateLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
